3.39 \(\int \frac {\csc (c+d x)}{a-a \sin ^2(c+d x)} \, dx\)

Optimal. Leaf size=29 \[ \frac {\sec (c+d x)}{a d}-\frac {\tanh ^{-1}(\cos (c+d x))}{a d} \]

[Out]

-arctanh(cos(d*x+c))/a/d+sec(d*x+c)/a/d

________________________________________________________________________________________

Rubi [A]  time = 0.06, antiderivative size = 29, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {3175, 2622, 321, 207} \[ \frac {\sec (c+d x)}{a d}-\frac {\tanh ^{-1}(\cos (c+d x))}{a d} \]

Antiderivative was successfully verified.

[In]

Int[Csc[c + d*x]/(a - a*Sin[c + d*x]^2),x]

[Out]

-(ArcTanh[Cos[c + d*x]]/(a*d)) + Sec[c + d*x]/(a*d)

Rule 207

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTanh[(Rt[b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rule 321

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(c^(n - 1)*(c*x)^(m - n + 1)*(a + b*x^n
)^(p + 1))/(b*(m + n*p + 1)), x] - Dist[(a*c^n*(m - n + 1))/(b*(m + n*p + 1)), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
 c, n, m, p, x]

Rule 2622

Int[csc[(e_.) + (f_.)*(x_)]^(n_.)*((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Dist[1/(f*a^n), Subst[Int
[x^(m + n - 1)/(-1 + x^2/a^2)^((n + 1)/2), x], x, a*Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n
 + 1)/2] &&  !(IntegerQ[(m + 1)/2] && LtQ[0, m, n])

Rule 3175

Int[(u_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Dist[a^p, Int[ActivateTrig[u*cos[e + f*x
]^(2*p)], x], x] /; FreeQ[{a, b, e, f, p}, x] && EqQ[a + b, 0] && IntegerQ[p]

Rubi steps

\begin {align*} \int \frac {\csc (c+d x)}{a-a \sin ^2(c+d x)} \, dx &=\frac {\int \csc (c+d x) \sec ^2(c+d x) \, dx}{a}\\ &=\frac {\operatorname {Subst}\left (\int \frac {x^2}{-1+x^2} \, dx,x,\sec (c+d x)\right )}{a d}\\ &=\frac {\sec (c+d x)}{a d}+\frac {\operatorname {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\sec (c+d x)\right )}{a d}\\ &=-\frac {\tanh ^{-1}(\cos (c+d x))}{a d}+\frac {\sec (c+d x)}{a d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 46, normalized size = 1.59 \[ \frac {\frac {\sec (c+d x)}{d}+\frac {\log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )}{d}-\frac {\log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{d}}{a} \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[c + d*x]/(a - a*Sin[c + d*x]^2),x]

[Out]

(-(Log[Cos[(c + d*x)/2]]/d) + Log[Sin[(c + d*x)/2]]/d + Sec[c + d*x]/d)/a

________________________________________________________________________________________

fricas [A]  time = 0.44, size = 55, normalized size = 1.90 \[ -\frac {\cos \left (d x + c\right ) \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - \cos \left (d x + c\right ) \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 2}{2 \, a d \cos \left (d x + c\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)/(a-a*sin(d*x+c)^2),x, algorithm="fricas")

[Out]

-1/2*(cos(d*x + c)*log(1/2*cos(d*x + c) + 1/2) - cos(d*x + c)*log(-1/2*cos(d*x + c) + 1/2) - 2)/(a*d*cos(d*x +
 c))

________________________________________________________________________________________

giac [B]  time = 0.15, size = 62, normalized size = 2.14 \[ \frac {\frac {\log \left (\frac {{\left | -\cos \left (d x + c\right ) + 1 \right |}}{{\left | \cos \left (d x + c\right ) + 1 \right |}}\right )}{a} + \frac {4}{a {\left (\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} + 1\right )}}}{2 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)/(a-a*sin(d*x+c)^2),x, algorithm="giac")

[Out]

1/2*(log(abs(-cos(d*x + c) + 1)/abs(cos(d*x + c) + 1))/a + 4/(a*((cos(d*x + c) - 1)/(cos(d*x + c) + 1) + 1)))/
d

________________________________________________________________________________________

maple [A]  time = 0.44, size = 51, normalized size = 1.76 \[ \frac {\ln \left (\cos \left (d x +c \right )-1\right )}{2 a d}+\frac {1}{d a \cos \left (d x +c \right )}-\frac {\ln \left (1+\cos \left (d x +c \right )\right )}{2 a d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(d*x+c)/(a-a*sin(d*x+c)^2),x)

[Out]

1/2/a/d*ln(cos(d*x+c)-1)+1/d/a/cos(d*x+c)-1/2/a/d*ln(1+cos(d*x+c))

________________________________________________________________________________________

maxima [A]  time = 0.35, size = 46, normalized size = 1.59 \[ -\frac {\frac {\log \left (\cos \left (d x + c\right ) + 1\right )}{a} - \frac {\log \left (\cos \left (d x + c\right ) - 1\right )}{a} - \frac {2}{a \cos \left (d x + c\right )}}{2 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)/(a-a*sin(d*x+c)^2),x, algorithm="maxima")

[Out]

-1/2*(log(cos(d*x + c) + 1)/a - log(cos(d*x + c) - 1)/a - 2/(a*cos(d*x + c)))/d

________________________________________________________________________________________

mupad [B]  time = 0.08, size = 31, normalized size = 1.07 \[ \frac {1}{a\,d\,\cos \left (c+d\,x\right )}-\frac {\mathrm {atanh}\left (\cos \left (c+d\,x\right )\right )}{a\,d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(sin(c + d*x)*(a - a*sin(c + d*x)^2)),x)

[Out]

1/(a*d*cos(c + d*x)) - atanh(cos(c + d*x))/(a*d)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ - \frac {\int \frac {\csc {\left (c + d x \right )}}{\sin ^{2}{\left (c + d x \right )} - 1}\, dx}{a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)/(a-a*sin(d*x+c)**2),x)

[Out]

-Integral(csc(c + d*x)/(sin(c + d*x)**2 - 1), x)/a

________________________________________________________________________________________